package net.API.IssueLemon.ThreadMain;

import java.text.SimpleDateFormat;
import java.util.Date;

public class logger {
    //日志输出(消息)
    public static void info(String s, String message){
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        String timeStr = sdf.format(new Date());
        System.out.println("\033[32m[" + timeStr + "][" + s + "]\033[0m" + message);
    }
    //日志输出(警告)
    public static void warning(String s, String message){
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        String timeStr = sdf.format(new Date());
        System.out.println("\033[31m[" + timeStr + "][" + s + "]\033[0m" + "\033[33m" + message);
    }
    //日志输出(错误)
    public static void error(String s, String message){
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        String timeStr = sdf.format(new Date());
        System.out.println("\033[31m[" + timeStr + "][" + s + "]\033[0m" + "\033[31m" + message + "\0330m]");
    }
}
